#define DEBUG
#include <cstdio>

using namespace std;

const int maxn=5000, maxm=5000;

int main() {
  freopen("butterfly.in", "r", stdin);
  freopen("butterfly.out", "w", stdout);

  int n, m;
  scanf("%d %d", &n, &m);

  bool swap = false;
  if ((m%2==1 || m>n) && n%2==0) {
    swap = true;
    int t;
    t=m, m=n, n=t;
  }

  static char ans[maxn+1][maxm+1];

  if (n%2 || m<6) {
    for (int i=1; i<=n; i++) {
      for (int j=1; j<=m; j++) {
	if (i%2) {
	  ans[i][j] = j%2 ? '(' : ')';
	} else {
	  if (j==1) {
	    ans[i][j] = '(';
	  } else if (j==m) {
	    ans[i][j] = ')';
	  } else {
	    ans[i][j] = j%2 ? ')' : '(';
	  }
	}
      }
    }
  } else {
    for (int i=1; i<=n; i++) {
      ans[i][1]='(', ans[i][m] = ')';
    }
    for (int j=1; j<=m; j++) {
      ans[1][j]='(', ans[n][j] = ')';
    }
    for (int i=2; i<n; i++) {
      for (int j=2; j<m; j++) {
	if (i%2) {
	    ans[i][j] = j%2 ? ')' : '(';
	} else {
	  ans[i][j] = j%2 ? '(' : ')';
	}
      }
    }
  }

  if (swap) {
    for (int i=1; i<=m; i++) {
      for (int j=1; j<=n; j++) {
	putchar(ans[j][i]);
      }
      putchar('\n');
    }
  } else {
    for (int i=1; i<=n; i++) {
      for (int j=1; j<=m; j++) {
	putchar(ans[i][j]);
      }
      putchar('\n');
    }
  }

  fclose(stdin);
  fclose(stdout);
  return 0;
}
